# Contributor: Ralf Rachinger <alpine@ralfrachinger.de>
# Maintainer: Ralf Rachinger <alpine@ralfrachinger.de>
# *Inspired* by https://github.com/archlinux/svntogit-community/blob/794c98925b4cc2684d067b7142710ae84bd80d21/trunk/PKGBUILD
pkgname=premake
pkgver=5.0.0_beta1
_ver=5.0.0-beta1
pkgrel=0
pkgdesc="Simple build configuration and project generation tool"
url="https://premake.github.io"
arch="all"
license="BSD-3-Clause"
source="
	https://github.com/premake/premake-core/releases/download/v$_ver/premake-$_ver-src.zip
	0001-Change-Test-FindLibrary-to-libc.patch
"
builddir="$srcdir/premake-$_ver-src"


build() {
	make -C "$builddir/build/gmake2.unix" config=release
}

check() {
	bin/release/premake5 test
}

package() {
	install -Dm755 bin/release/premake5 "$pkgdir"/usr/bin/premake5
	install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname"/LICENSE
}

sha512sums="
4745cfa796f3f7616b96c2541bca54ba91ef53310cd3a8b9891fcb22170b1b68ebe245471aa63d82fbd94a50643ddf468b66c85e32c1ce214cf5c65b5da27e62  premake-5.0.0-beta1-src.zip
3b86dd81311c42da7637fd268f445f90c52695c9e7dac428e658e5df64d77ba0683aec0214676182993e6b5dbcb3ea33385e9a672bcd6569efd1c2ea434566a7  0001-Change-Test-FindLibrary-to-libc.patch
"
